//
//  SwipeTableViewCell.h
//  quanminzhekou
//
//  Created by zxl on 15/1/15.
//  Copyright (c) 2015年 zhongqinglongtu. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol SwipeTableViewCellDelegate;

@interface SwipeTableViewCell : UITableViewCell <UIGestureRecognizerDelegate>
@property (nonatomic, strong) UIView *backView;
@property (nonatomic, readwrite) float animationDuration; // default is 0.2
@property (nonatomic, readwrite) BOOL panElasticity; // When panning/swiping the cell's location is set to exponentially decay. The elasticity (also know as rubber banding) matches that of a UIScrollView/UITableView. default is YES
@property (nonatomic, readwrite) CGFloat panElasticityStartingPoint; // When using panElasticity this property allows you to control at which point elasticitykicks in. default is 0
@property (nonatomic, strong) UIColor *backViewbackgroundColor; // default is [UIColor whiteColor]
@property (nonatomic, assign) id <SwipeTableViewCellDelegate> delegate;

@property (nonatomic, assign) BOOL  isSwiping;
@property (nonatomic, assign) BOOL  isCanSwip;
@property (nonatomic, assign) BOOL  isHasSelectedType;

- (void)didStartSwiping;
- (void)animateContentViewForPoint:(CGPoint)point velocity:(CGPoint)velocity;
- (void)resetCellFromPoint:(CGPoint)point velocity:(CGPoint)velocity;
- (void)cleanupBackView;
- (void)resetContentViewWithFromPoint:(CGPoint)point velocity:(CGPoint)velocity animating:(BOOL)animating;

@end

@protocol SwipeTableViewCellDelegate <NSObject>
@optional
-(void)swipeTableViewCellDidStartSwiping:(SwipeTableViewCell*)swipeTableViewCell;
-(void)swipeTableViewCell:(SwipeTableViewCell*)swipeTableViewCell didSwipeToPoint:(CGPoint)point velocity:(CGPoint)velocity;
-(void)swipeTableViewCellWillResetState:(SwipeTableViewCell*)swipeTableViewCell fromPoint:(CGPoint)point velocity:(CGPoint)velocity;
-(void)swipeTableViewCellDidResetState:(SwipeTableViewCell*)swipeTableViewCell fromPoint:(CGPoint)point velocity:(CGPoint)velocity;

@end
